<!DOCTYPE html>
<html xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <title>Hello WebSocket</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/plug-in/layui/css/layui.css">
    <link rel="stylesheet" href="/css/base.css">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="/plug-in/jquery/jquery-3.5.1.min.js"></script>
    <script type="text/javascript" src="/plug-in/layui/layui.js"></script>
    <script type="text/javascript" src="/plug-in/lay-config.js"></script>
    <script src="/plug-in/websocket/sockjs.min.js"></script>
    <script src="/plug-in/websocket/stomp.min.js"></script>
    <!--<script src="/plug-in/websocket/web-socket.js"></script>-->
</head>
<body>
<div id="main-content" class="container" style="margin-top: 10px;">
    <p shiro:user="" >
        Hello, <span shiro:principal=""></span>, how are you today?
    </p>
    <div class="row">
        <!--<form class="navbar-form" style="margin-left:0px">-->
        <!--    <div class="col-md-12">-->
        <!--        <div class="form-group">-->
        <!--            <label>WebSocket 连接：</label>-->
        <!--            <button class="btn btn-primary" type="button" onclick="connect();">进行连接</button>-->
        <!--            <button class="btn btn-danger" type="button" onclick="disconnect();">断开连接</button>-->
        <!--        </div>-->
        <!--        <label>订阅地址：</label>-->
        <!--        <div class="form-group">-->
        <!--            <input type="text" id="subscribe" class="form-control" placeholder="订阅地址">-->
        <!--        </div>-->
        <!--        <button class="btn btn-warning" onclick="subscribeSocket();" type="button">订阅</button>-->
        <!--    </div>-->
        <!--</form>-->
    </div>
    </br>
    <div class="row">
        <div class="form-group">
            <label>发送的目标用户：</label>
            <input type="text" id="targetUser" class="form-control" placeholder="发送的用户">
            <label for="content">发送的消息内容：</label>
            <input type="text" id="content" class="form-control" placeholder="消息的内容">
        </div>
        <button class="btn btn-info" type="button">发送</button>
    </div>
    </br>
    <script>
        $(".btn.btn-info").click(function () {
            parent.sendMessageNoParameter($("#targetUser").val(), $("#content").val())
        })
    </script>
</div>
</body>
</html>